The present invention relates in general to the manipulation of computer images and in particular to a method for efficiently magnifying or “stretching” low-resolution images for display as high resolution images.
On conventional computer graphics hardware (which may include one or more graphics processors), raster images (i.e. rectangular arrays of pixel values typically representing brightness or color) can be interpolated bi-linearly for display at higher or lower resolution. For example, a 128×128 pixel image can be rendered at 96×96 pixels, which process may be referred to as “scaling down”, “downsampling” or “minifying”, or at 192×192 pixels, which process may be referred to as “scaling up”, “upsampling”, “stretching” or “magnifying”. The original image's 128×128 pixels are generally referred to as “samples”, so that the terms “pixel” and “pixels” may be reserved for the display elements. Hence, resampling can be interpreted as the conversion of original image samples to pixels whose spacing differs from the spacing of the original image samples.
In either case, color or brightness values “between pixels” may be estimated using an interpolation scheme. Bilinear interpolation is generally considered the simplest and most computationally efficient interpolation scheme that preserves the continuity of the interpolated image function. Thus, it is often used and, on many common graphics architectures, it is hardware-accelerated.
Mathematically, linear interpolation of a discretely sampled function can be understood as convolution of the function with the linear interpolation kernel shown in FIG. 1A.
The bilinear, two-dimensional kernel k(x,y) is separable, and so constructed simply by multiplying one-dimensional linear kernels: k(x,y)=k(x)*k(y) as illustrated in FIG. 1B.
It is noted that this bilinear kernel is usually considered adequate (on the basis of visually perceived subjective quality) for resampling two-dimensional photographic images, when the target resolution is not much greater than the original resolution. However, when an image is magnified substantially, for example, by a factor of more than about 4 on present-day computer displays, visual defects become apparent using existing methods. These defects are primarily related to the lack of continuity of the derivative of k(x) (FIG. 1A), resulting in obvious “creasing” in the interpolated image wherever edges or other non-smooth features appear in the original image. This “creased” appearance is evident in the two-dimensional kernel k(x,y) itself. Therefore, an improved method for upscaling images which does not experience the above-described creasing is needed.